#!/bin/bash

#Gnome Network Manager start
#
#Authors:
#  Bruno Goncalves Araujo <www.biglinux.com.br>
#
#License: GPLv2 or later
#################################################

#Translation
export TEXTDOMAINDIR="/usr/share/locale-langpack"
export TEXTDOMAIN=bigcontrolcenter-internet-manager-gnome

if ! [ -e /usr/bin/nm-applet ]; then

if [ -e /usr/bin/wicd-client ]; then
  kdialog --yesno $"O Gnome Network Manager e utilizado por esse painel, mas nao esta instalado, devo instalar agora?
Atencao: Isso ira remover o gerenciador de conexao Wicd."
else
  kdialog --yesno $"O Gnome Network Manager e utilizado por esse painel, mas nao esta instalado, devo instalar agora?"
fi
  if [ $? = "0" ]; then
      bigsudo bigsynaptic --install network-manager-gnome
      if ! [ -e /usr/bin/wicd-client ]; then
      killall wicd-client
      fi
      bigsudo "start network-manager"
  fi
fi

nm-connection-editor &
nm-applet --sm-disable &
